package com.example.common;

import com.example.domain.entity.Account;

public class UserHolder {
    private static final ThreadLocal<Account> tl = new ThreadLocal<>();

    public static void saveUser(Account user){
        tl.set(user);
    }

    public static Account getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}
